Skip to content

Add Support for Saving Predicted ML Metadata and Raw Output Tensors to SDS Files - #35

Merged
MiloradCvjetkovic merged 5 commits into
Arm-Examples:mainfrom
Jithendar11:br_fs_sds_metadata
Sep 23, 2026
Merged

MiloradCvjetkovic merged 5 commits into
Arm-Examples:mainfrom
Jithendar11:br_fs_sds_metadata

Conversation

@Jithendar11

Copy link
Copy Markdown
Contributor

Description

Added support for recording predicted ML metadata and raw model output tensors into separate SDS files, with runtime control for enabling the additional ML output streams.

Changes

  • Added support for generating the following SDS files:

    • ML_Result.sds

      • Stores post-processed prediction metadata.
      • Includes:
        • Predicted class label
        • Class index
        • Confidence score
    • ML_RawOutput.sds

      • Stores the raw ML output tensors directly from the model.
      • No post-processing is applied to the tensor data.
  • Added runtime SDS flag support to control the generation of these additional SDS files.

    • Uses the user-defined SDS flag F.
    • ML_Result.sds and ML_RawOutput.sds are generated only when flag F is enabled.
    • When flag F is not enabled, the existing SDS workflow remains unchanged.

@Jithendar11
Jithendar11 force-pushed the br_fs_sds_metadata branch 2 times, most recently from a5c8afe to 0eb6129 Compare September 17, 2026 09:35
@Jithendar11
Jithendar11 marked this pull request as ready for review September 18, 2026 09:50
@MiloradCvjetkovic

Copy link
Copy Markdown
Contributor

Hi @Jithendar11 ,

is it necessary for flag F to take effect while a recording is already active?

If flag F is only relevant before recording starts, I would suggest moving the opening and closing of the streams into the OpenStreams and CloseStreams functions which would fit more naturally into existing concept.
You already had this implementation; you could simply make it conditional and have OpenStreams open the additional streams when flag F is set.

With the current implementation, OpenExtraOutputStreams or CloseExtraOutputStreams are called on every loop iteration while recording or playback is active. This is somewhat misleading, since these functions first check the current state of the streams and then decide whether any action is needed, meaning that in most iterations they end up doing nothing.

Also, if flag F can take effect during an already active recording, then the playback files ML_RawOutput.<n>.p.sds and ML_Result.<n>.p.sds will not be identical. Achieving identical files would require enabling flag F at exactly the same point during playback as it was enabled during the original recording, which is not possible.

@Jithendar11

Copy link
Copy Markdown
Contributor Author

Hi @MiloradCvjetkovic ,

Moved the option sds stream during session initialization.

data into SDS files.

Summary of Changes:
- Added support to save ML_Result.sds and ML_RawOutput.sds.
- ML_Result.sds stores predicted metadata, including class label,
  class index, and class confidence score.
- ML_RawOutput.sds stores raw ML output tensors without any
  post-processing.
Summary of Changes:
- Added runtime SDS flag support to control additional SDS file generation.
- Used user-defined SDS flag F to enable additional ML output files.
- ML_Result.sds and ML_RawOutput.sds are generated only when flag F is enabled.
Comment thread RockPaperScissors/AppKit-E8_USB/algorithm/sds_main.c Outdated
@Jithendar11

Copy link
Copy Markdown
Contributor Author

Removed this check (status == 0)

@MiloradCvjetkovic MiloradCvjetkovic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MiloradCvjetkovic
MiloradCvjetkovic merged commit b55ee72 into Arm-Examples:main Sep 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants